package com.lx.controller;

import java.net.URL;
import java.util.ResourceBundle;

import com.lx.controller.MainApp;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;


public class LoginController implements Initializable {
    @FXML private TextField user;
    @FXML private PasswordField password;
    private MainApp mainApp;


    public void setApp(MainApp mainApp){
        this.mainApp = mainApp;
    }
    @FXML
    public void LOGIN_M(ActionEvent event) {
        mainApp.userlogin(user.getText(), password.getText());
    }

    @FXML
    private void CLEAR_M(ActionEvent event) {
        user.setText(null);
        password.setText(null);
    }

    @Override
    public void initialize(URL url, ResourceBundle rb) {
        // TODO
    }
}